# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=sipcalc
pkgver=1.1.6
pkgrel=0
pkgdesc="Advanced console based ip subnet calculator"
url="http://www.routemeister.net/projects/sipcalc/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="http://www.routemeister.net/projects/sipcalc/files/${pkgname}-${pkgver}.tar.gz"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure || return 1
	make || return 1
}

package() {
	cd "$_builddir"
        mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/lib" "$pkgdir/usr/share/man/man1"
        make prefix="$pkgdir"/usr MANDIR="$pkgdir"/usr/share/man/man1 install || return 1

}

sha512sums="9d2047a6fb6ef177d455f44abea19bab7d0131b16eb2444b2b074e94e776854fa74084ab625d2be9b64d136979ede71722c2e24dca12ff54e4a5bb02f947570e  sipcalc-1.1.6.tar.gz"
